package hlhj.fhp.supreme.customview

import android.app.Dialog
import android.content.Context
import android.os.Bundle
import hlhj.fhp.supreme.R
import hlhj.fhp.supreme.utils.MyUtils
import kotlinx.android.synthetic.main.updialog.*

/**
 * Created by Administrator on 2018\5\2 0002.
 */
class UpProgressDialog(context: Context) :Dialog(context, R.style.CustomDialog){
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.updialog)



    }
    fun setProgress(i:Double){
        tvPg.setText("${MyUtils.formatDouble(i*100,2)}%")
        pg.setProgress((i*100).toInt())
    }
}